# TODO: Add comment
# 
# Author: dkor
###############################################################################


##########################################################
#######################  SAMPLE CODE ####################### 
##########################################################
# r.engine.eval("init_dat('"+
#              sliderDataX.name + "'," +
#              sliderDataX.min +","+ sliderDataX.max +","+ stepX + ",'" +
#              sliderDataY.name + "'," +
#              sliderDataY.min +","+ sliderDataY.max +","+ stepY +
#              ")");
# r.engine.eval("plot_viz('dummy', 'X.step.', " +
#              "'"+sliderDataX.name+"','"+sliderDataY.name+"')");

###Pass variable number of parameters ????
elipsis_example <- function(...) 
{
	l <- list(...) # Put the arguments in a (named) list
	for (i in seq(along = l)) 
	{
		cat("Argument name:", names(l)[i], "Value:", l[[i]], "\n")
	}
	p <- data.frame(...)
	print_debug(str(p))
	print_debug(str(p$a))
}

get_elipsis<- function(...) 
{
	return(list(...))
}

get_dat<- function ()
{
	dat_str = print_debug(dat)
	return(dat_str)
}

test_elipsis<- function(...) {
	print_debug(1)
	print_debug(args)
	print_debug(2)
	print_debug(3)
	print_debug(formals)
	print_debug(4)
	l <- list(...) # Put the arguments in a (named) list
	for (i in seq(along = l)) {
		cat("Argument name:", names(l)[i], "Value:", l[[i]], "\n")
	}
	assign(names(l)[i], l[[i]])
	print_debug(test)
}
